package com.ming.springboot.config;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.io.IOException;
import java.io.PrintWriter;

/**
 * Created by mqsi on 2022/5/16 20:34
 */
public class MyServlet extends HttpServlet {
	@Override
	protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
		HttpSession httpSession = req.getSession();
		System.out.println("Session is Create=" + httpSession.isNew());
		PrintWriter writer = resp.getWriter();
		writer.println("<h1>Hello MyServlet</h1>");
		writer.close();
	}
}
